package cn.lg.soar.general.service.impl;

import cn.lg.soar.common.util.current.CurrentProxy;
import cn.lg.soar.general.entity.FileMetadata;
import cn.lg.soar.general.mapper.FileMetadataMapper;
import cn.lg.soar.general.service.IFileMetadataService;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

/**
 * 文件元数据表
 * @author 41225
 * @since 2024-06-01
 * 开源项目：https://gitee.com/lgx1992/lg-soar 求star！请给我star！请帮我点个star！
 */
@Service
public class FileMetadataServiceImpl extends ServiceImpl<FileMetadataMapper, FileMetadata> implements IFileMetadataService, CurrentProxy<FileMetadataServiceImpl> {

    @Override
    public FileMetadata getByCode(String code) {
        return getOne(
                Wrappers.<FileMetadata>lambdaQuery()
                        .eq(FileMetadata::getCode, code)
        );
    }

}
